<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        position: relative;
      }
      span {
        position: absolute;
        top: 0;
        left: 427px;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <div>
      <img src="./images/宫泽千春.png" alt="" />
      <span>X</span>
    </div>
    <script>
      window.onload = function () {
        const span = document.querySelector("span");
        span.onclick = function () {
          this.parentElement.style.display = "none";
        };
      };
    </script>
  </body>
</html>
